// Type: System.Windows.PresentationSource
// Assembly: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// Assembly location: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationCore.dll

using System;
using System.Collections;
using System.Runtime;
using System.Security;
using System.Windows.Media;
using System.Windows.Threading;

namespace System.Windows
{
    public abstract class PresentationSource : DispatcherObject
    {
        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        protected PresentationSource();

        public CompositionTarget CompositionTarget { [SecurityCritical,
                                                      TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; }

        public abstract Visual RootVisual { get; [SecurityCritical]
        set; }

        public abstract bool IsDisposed { get; }

        public static IEnumerable CurrentSources { [SecurityCritical]
        get; }

        [SecurityCritical]
        public static PresentationSource FromVisual(Visual visual);

        [SecurityCritical]
        public static PresentationSource FromDependencyObject(DependencyObject dependencyObject);

        [SecurityCritical]
        public static void AddSourceChangedHandler(IInputElement element, SourceChangedEventHandler handler);

        public static void RemoveSourceChangedHandler(IInputElement e, SourceChangedEventHandler handler);
        protected abstract CompositionTarget GetCompositionTargetCore();

        [SecurityCritical]
        [SecurityTreatAsSafe]
        protected void RootChanged(Visual oldRoot, Visual newRoot);

        protected void AddSource();
        protected void RemoveSource();
        protected void ClearContentRenderedListeners();

        public event EventHandler ContentRendered;
    }
}
